package cn.gailvlun.gll.presentation.login.adapter;

import cn.gailvlun.gll.R;
import cn.gailvlun.gll.presentation.base.App;



public enum GenderType {
    male(true, R.string.male_compliment), female(false, R.string.female_compliment);

    public boolean isMale;
    public int compliment;

    GenderType(boolean isMale, int compliment) {
        this.isMale = isMale;
        this.compliment = compliment;
    }

    public static GenderType getGenderByBoolean(boolean theBoolean) {
        return theBoolean ? male : female;
    }

    public int getCompliment() {
        return compliment;
    }

    @Override
    public String toString() {
        switch (this) {
            case male: {
                return App.getInstance().getString(R.string.male);
            }
            case female: {
                return App.getInstance().getString(R.string.female);
            }
        }
        return "";
    }
}
